/*
 * @Author: 脉迈
 * @Date: 2021-10-18 14:47:29
 * @LastEditors: 脉迈
 * @LastEditTime: 2021-12-09 17:47:30
 */
export const blockData = {
  style: {
    position: "relative",
    height: 250,
    backgroundColor: "",
    backgroundImage: "",
    backgroundSize: "cover",
  },
  children: [],
};

export const blockImage = {
  name: "blockImage",
  style: {
    position: "absolute",
    width: 375,
    height: 250,
    top: 0,
    left: 0,
    rotate: 0,
    zIndex: 1,

    opacity: 1,
  },
  properties: {
    src: {
      label: "图片地址",
      value:
        "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
      format: "image",
      editorType: "Input",
      attr: "src",
    },
    link: {
      label: "跳转链接",
      value: "https://www.baidu.com",
      format: "text",
      editorType: "Input",
      attr: "link",
    },
  },
  properStyle: {},
};

export const blockText = {
  name: "blockText",
  style: {
    position: "absolute",
    width: 100,
    height: 30,
    top: 0,
    left: 0,
    rotate: 0,
    zIndex: 1,
    opacity: 1,
  },
  properties: {
    text: {
      label: "文本",
      value: "请输入文本",
      format: "text",
      editorType: "TextArea",
      attr: "text",
    },
    font: {
      label: "字体样式",
      value: {
        fontWeight: "normal",
        fontStyle: "normal",
        textDecoration: "unset",
        textAlign: "left",
        color: "rgba(0,0,0,1)",
      },
      editorType: "FontType",
      attr: "text",
    },
  },
  properStyle: {
    lineHeight: {
      label: "行高",
      value: "1.8",
      format: "lineHeight",
      editorType: "Input",
      attr: "lineHeight",
    },
    fontSize: {
      label: "字体大小",
      value: "16",
      format: "fontSize",
      editorType: "InputNumber",
      attr: "fontSize",
    },
    fontFamily: {
      label: "字体",
      value: "fontA",
      format: "fontFamily",
      editorType: "Select",
      options: [
        {
          label: "默认字体",
          value: "fontA",
        },
        {
          label: "B字体",
          value: "fontB",
        },
      ],
      attr: "fontFamily",
    },
  },
};

export const blockButton = {
  name: "blockButton",
  style: {
    position: "absolute",
    width: 194,
    height: 32,
    top: 0,
    left: 0,
    rotate: 0,
    zIndex: 1,
    opacity: 1,
  },
  properties: {
    text: {
      label: "文本",
      value: "按钮",
      format: "text",
      editorType: "Input",
      attr: "text",
    },
    link: {
      label: "跳转链接",
      value: "https://www.baidu.com",
      format: "text",
      editorType: "Input",
      attr: "link",
    },
  },
  properStyle: {
    borderColor: {
      label: "边框颜色",
      value: "transparent",
      format: "borderColor",
      editorType: "Color",
      attr: "borderColor",
    },
    borderWidth: {
      label: "边框粗细",
      value: 0,
      format: "borderWidth",
      editorType: "InputNumber",
      attr: "borderWidth",
    },
    borderRadius: {
      label: "圆角",
      value: 10,
      format: "borderRadius",
      editorType: "InputNumber",
      attr: "borderRadius",
    },
    fontSize: {
      label: "字体大小",
      value: "16",
      format: "fontSize",
      editorType: "InputNumber",
      attr: "fontSize",
    },
    color: {
      label: "文字颜色",
      value: "rgba(255,255,255,1)",
      format: "color",
      editorType: "Color",
      attr: "color",
    },
    backgroundColor: {
      label: "填充颜色",
      value: "rgba(24,144,255,1)",
      format: "backgroundColor",
      editorType: "Color",
      attr: "backgroundColor",
    },
    justifyContent: {
      label: "文字对齐",
      value: "center",
      format: "justifyContent",
      editorType: "Select",
      options: [
        {
          label: "居中",
          value: "center",
        },
        {
          label: "左对齐",
          value: "flex-start",
        },
        {
          label: "右对齐",
          value: "flex-end",
        },
      ],
      attr: "justifyContent",
    },
  },
};
